$(function(){
	$('#visual').pignoseLayerSlider({
		play : '.btn-play',
		pause : '.btn-pause',
		next : '.btn-next',
		prev : '.btn-prev'
	});
	var company_code =$('#welcomeCompany').text(); 
	showAllHtml(company_code);
});

function openContactPage(openNewPage){
	
	$('#menu_banner_top li').click(function(){
		$(this).siblings('li').removeClass(' menu__item--current');
		$(this).addClass('menu__item--current');
		
	});
	
	var company_code =$('#welcomeCompany').text(); 
	
	if('123'== openNewPage){
		
		window.location.href = COMMON_URL.URL+ company_code;

	}else{
		
		$('.headBanner').find('.menu__item--current')
		$('#main_page').hide();
		var url = COMMON_URL.URL+openNewPage+"/"+ company_code;
		
		$.get(url,function(data){
			$('#contact_page').html(data);
		});
	}
	
}


function showAllHtml(companyCode){
	
	$.get('/showAll/headBot/'+companyCode,function(data){
		$('#header-bot').html(data);
	});
	
	$.get('/showAll/bannerTop/'+companyCode,function(data){
		$('#banner_top').html(data);
	});
	
	/*$.get('/showAll/bannerGrid/'+companyCode,function(data){
		$('#banner_grid').html(data);
	});*/
	
	$.get('/showAll/content/'+companyCode,function(data){
		$('#content_top_page').html(data);
	});
	
	$.get('/showAll/contentBottom/'+companyCode,function(data){
		$('#contentBottom_page').html(data);
	});
	
	$.get('/showAll/productNav/'+companyCode,function(data){
		$('#productNav').html(data);
	});
	
	$.get('/showAll/couponsNav/'+companyCode,function(data){
		$('#couponsNav').html(data);
	});
	
	$.get('/showAll/footerNav/'+companyCode,function(data){
		$('#footerNav').html(data);
	});
}